<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
	<f:layout name="Default" />

	This Template is responsible for creating a table of domain objects.

	If you modify this template, do not forget to change the overwrite settings
	in /Configuration/ExtensionBuilder/settings.yaml:
	  Resources:
		Private:
		  Templates:
			List.html: keep

	Otherwise your changes will be overwritten the next time you save the extension in the extension builder

	<f:section name="content">
		<f:flashMessages />
		<div class="portlet light ">
        <div class="portlet-title">
	        <div class="caption">
	            <f:link.action action="list" arguments="{excelExport:1}" class="btn btn-default">导出</f:link.action>
	        </div>
	        <div class="actions">
	            <div class="btn-group btn-group-devided">
	                <f:form action="list" name="search" class="form-inline" method="GET">
	                    <div class="input-group">
	                        <div class="input-icon">
	                            <i class="fa fa-search"></i>
	                           <f:form.textfield name="keyword" value="{keyword}" class="form-control" placeholder="请输入查询条件"/>
	                        </div>
	                        <span class="input-group-btn">
	                            <f:form.submit class="btn btn-success" value="搜" />
	                        </span>
	                    </div>
	                </f:form>
	            </div>
	        </div>
	    </div>
        
        <f:widget.paginate objects="{invoices}" as="invoicePagination"  configuration="{settings.paginate}">
            <div class="portlet-body">
              <div class="table-scrollable">
                <table class="table table-hover table-light">
                    <thead>
                        <tr role="row">
                            <th>序号</th>
                            <th>收据抬头</th>
                        	<th>税号</th>
                            <th>捐赠时间</th>
                            <th>捐赠金额</th>
                            <th>捐赠渠道</th>
                            <th>联系人</th>
                            <th>联系电话</th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                        <f:for each="{invoicePagination}" as="invoice" iteration="itemIteration1">
                        <tr>
                        	<td>
                        		{f:cObject(typoscriptObjectPath:'lib.calc', data:'{itemIteration1.cycle}+({page}-1)*{settings.paginate.itemsPerPage}')}
                        	</td>  
                            <td>
								<f:link.action action="show" arguments="{invoice : invoice}">{invoice.header}</f:link.action>
                            </td>
                            <td>{invoice.spare1}</td> 
                            <td>
                            	{invoice.donatetime -> f:format.date(format: 'Y-m-d')}
							</td>
                            <td class="tc">￥{invoice.money}</td>
                            <td>{invoice.channelid.name}</td>
                            <td>{invoice.people}</td>
                            <td>{invoice.telphone}</td>
                            <td class="text-right">
                                <f:link.action action="edit" arguments="{invoice : invoice}" class="btn btn-info btn-xs edit">编辑</f:link.action>
                                <f:link.action action="delete" arguments="{invoice : invoice}" onclick="return confirm('您确定要删除吗?');" class="btn btn-danger btn-xs delete btn-del">删除</f:link.action>
                            </td>
                        </tr>
                        </f:for>
                    </tbody>
                </table>
            </div>
          </div>
        </f:widget.paginate>
    </div>
	</f:section>
</html>